<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <title>CTGU在线考试系统</title>
    <link rel="stylesheet" th:href="@{https://cdn.bootcss.com/semantic-ui/2.2.13/semantic.min.css}"/>
    <link rel="stylesheet" th:href="@{/css/app.css}"/>
    <link rel="stylesheet" th:href="@{/css/discuss/discuss.css}"/>
    <script type="text/javascript" th:src="@{https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js}"></script>
    <script type="text/javascript" th:src="@{https://cdn.bootcss.com/semantic-ui/2.2.13/semantic.min.js}"></script>
    <script type="text/javascript"
            th:src="@{https://cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.min.js}"></script>
    <script type="text/javascript" th:src="@{/js/app.js}"></script>
    <script type="text/javascript" th:src="@{/js/discuss/discuss.js}"></script>
</head>
<body>
<div class="ui fixed inverted menu">
    <a th:href="@{/}" class="header item">
        <!--<img class="ui" th:src="@{/img/logo_flat.png}" width="104" height="24" alt="" />-->
        <img class="ui" th:src="@{/img/logo.png}" width="156" height="32" alt=""/>
    </a>
    <a th:href="@{/contest/index}" href="#" class="item">
        <i class="desktop icon"></i>在线考试
    </a>
    <a th:if="${current_account == null}" th:onclick="'app.showLogin()'" class="item">
        <i class="list layout icon"></i>题库中心
    </a>
    <a th:if="${current_account != null}" th:href="@{/problemset/list}" class="item">
        <i class="list layout icon"></i>题库中心
    </a>
    <a th:if="${current_account != null}" th:href="@{/discuss/1}" class="item">
        <i class="talk icon"></i>讨论区
    </a>
    <a th:if="${current_account == null}" th:onclick="'app.showLogin()'" class="item">
        <i class="talk icon"></i>讨论区
    </a>
    <a th:onclick="'app.showLogin()'" class="right item" th:if="${current_account == null}">
        <i class="sign in icon"></i>登录
    </a>
    <div class="ui simple dropdown right item" th:if="${current_account != null}">
        <img class="ui avatar image" th:src="@{'/upload/images/'+${current_account.avatarImgUrl}}"/>
        <span th:text="${current_account.name}"></span> <i class="dropdown icon"></i>
        <div class="menu">
            <a class="item" th:href="@{/account/profile}">
                <i class="user icon"></i>我的主页
            </a>
            <a th:href="@{/manage/login}" class="item" id="manage">
                <i class="sign out icon"></i>后台管理
            </a>
            <a th:href="@{/message/index}" class="item" id="">
                <i class="mail icon">1</i> 消息通知
            </a>
            <a class="item" id="logout">
                <i class="sign out icon"></i>退出
            </a>
        </div>
    </div>
</div>
<div class="ui header container">
    <div class="ui large breadcrumb">
        <a class="section" th:href="@{/}"><i class="home icon"></i>首页</a>
        <i class="right chevron icon divider"></i>
        <div class="active section">消息列表</div>
    </div>
</div>

<div class="ui discussList container">
    <div class="ui grid">
        <div class="eleven wide column">

            <div class="ui green secondary pointing menu" style="margin-top: 1em;">

                <!--                <a class="item">精华</a>-->
                <!--                <div class="right item">-->
                <!--                    <a class="positive ui button"><i class="write icon"></i>我要发布</a>-->
                <!--                    <a  class="positive ui button"><i class="write icon"></i>我要发布</a>-->
                <!--                </div>-->
            </div>
            <div class="ui divided items" th:each="item,itemStats : ${data['questionnaires']}">
                <div class="item">
                    <div class="ui avatar image mini">
                        <!--                        <img  />-->
                    </div>
                    <div class="content">
                        <a class="header" style="font-size: 15px;">
                            <p th:text="${item.title}">标题</p>
                        </a>
                        <div class="extra" style="font-size: 13px;">
                            <!--                            <span class="right floated">-->
                            <!--                                <i class="talk outline icon"></i>-->
                            <!--                                <span>23</span>-->
                            <!--                                |-->
                            <!--                                <i class="thumbs outline up icon"></i>-->
                            <!--                                <span>17</span>-->
                            <!--                                |-->
                            <!--                                <i class="unhide icon"></i>-->
                            <!--                                <span>400</span>-->
                            <!--                            </span>-->
                            <!--                            <span th:text="${item.}">xxx</span>-->
                            <span th:text="'发布于: ' + ${item.createTime}">2018-01-13 11:33:51 发布于</span>
                        </div>
                        <a th:href="@{/questionnaire/list/{id}(id=${item.id})}" target="_blank" th:text="点击此处查看">http://localhost:8080/manage/questionnaire/list/15</a>
                    </div>
                </div>

            </div>
        </div>

    </div>
</div>


<!-- 不可抗力元素 -->
<div class="second-footer">
</div>

<div th:include="footer::footer"></div>


<script th:src="@{https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.10/vue.min.js}"></script>
<script th:src="@{https://cdnjs.cloudflare.com/ajax/libs/fetch/0.10.1/fetch.min.js}"></script>
<script th:inline="javascript">
    /*<![CDATA[*/
    var pageNum = /*[[${data['pageNum']}]]*/;
    var pageSize = /*[[${data['pageSize']}]]*/;
    var totalPageNum = /*[[${data['totalPageNum']}]]*/;
    var totalPageSize = /*[[${data['totalPageSize']}]]*/;
    var contests = /*[[${data['contests']}]]*/;
    var contextPath = /*[[${#httpServletRequest.getContextPath()}]]*/;

    $(function () {
        app.init(contextPath);
        // contestIndexPage.init(pageNum, pageSize, totalPageNum, totalPageSize, contests);
    });
    /*]]>*/
</script>


</body>
</html>